package com.itheima.collection;

import java.util.ArrayList;
import java.util.Collection;

public class Demo04 {

    public static void main(String[] args) {

        Collection<String> list= new ArrayList<>();
        list.add("蔡徐坤");
        list.add("蔡徐坤");
        list.add("黄子韬");
        list.add("鹿晗");

        for (String s : list) {
            if(s.equals("蔡徐坤")){
                s="张艺兴";
            }


        }
        System.out.println(list);
    }
}
